package com.lihaogn.sell.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import java.util.Date;

/**
 * @FileName: Food
 * @Description: 菜品实体类
 *
 * -- 菜品信息
 * DROP TABLE IF EXISTS `food`;
 * CREATE TABLE `food` (
 *   `food_id` varchar(40) NOT NULL,
 *   `food_name` varchar(20) NOT NULL,
 *   `food_price` decimal(5,2) NOT NULL,
 *   `food_stock` int NOT NULL, -- 库存
 *   `food_image` varchar(200) NOT NULL,
 *   `food_create_time` datetime NOT NULL DEFAULT now(),
 *   `food_modified_time` timestamp ,
 *   `food_is_hot` tinyint unsigned NOT NULL DEFAULT 0, -- 是否热门：1热门0不热门
 *   `food_desc` varchar(255) ,
 *   `food_status` tinyint unsigned NOT NULL DEFAULT 1, -- 状态：1在售0下架
 *   `fcc_id` varchar(40) NOT NULL, -- 外键，菜品烹饪类别
 *   `ftc_id` varchar(40) NOT NULL, -- 外键，菜品荤素类别
 *   PRIMARY KEY (`food_id`)
 * --   CONSTRAINT `food_fk1` FOREIGN KEY (`fcc_id`) REFERENCES `food_cook_category` (`fcc_id`),
 * --   CONSTRAINT `food_fk2` FOREIGN KEY (`ftc_id`) REFERENCES `food_type_category` (`ftc_id`)
 * ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
 *
 * alter table `food` add `food_sale_count` int not null default 0;
 * alter table `food` add `food_score` double not null default 3;
 * alter table food add food_material varchar(255);
 *
 * @Author: lihao
 * @Date: 2019-04-22 16:29
 * @Version: 1.0
 */
@Data
public class Food {

    private String foodId;
    private String foodName;
    private Double foodPrice;
    private Integer foodStock;
    private String foodImage;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date foodCreateTime;
    private Integer foodIsHot;
    private String foodDesc;
    private Integer foodStatus;
    private String fccId;
    private String ftcId;
    private Integer foodSaleCount;
    private Double foodScore;
    private String foodMaterial;

}
